<!doctype html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <title>文件管理系统</title>
  <link href="bootstrap.min.css" rel="stylesheet" />
  <link href="webui.css" rel="stylesheet" media="screen" />
</head>
<body>
  <div class="container">
    <div class="row">
      <h1>{{.Title}}</h1>
      <div class="alert alert-warining hidden" id="support-alert">
        <b>注意!</b> 您的浏览器无法支持本系统的运行，请使用现代浏览器。
      </div>
    </div>
    
    <div class="row">
      <div class="col-sm">
        <div class="progress">
          <div class="progress-bar progress-bar-striped" role="progressbar" style="width: 0%"></div>
        </div>
        <input id="inpUpload" type="file" class="hidden" />
      </div>
      <div class="col-sm">
        <button class="btn btn-primary" id="btnUpload">上传</button>
      </div>
    </div>

    <div class="row file-list">
      <table class="table table-striped table-hover table-bordered">
        <thead class="thead-light">
          <tr>
            <td scope="col">文件名</td>
            <td scope="col">文件大小</td>
            <td scope="col">操作</td>
          </tr>
        </thead>
        <tbody id="file-list"></tbody>
      </table>
    </div>
  </div>

  <div class="modal fade" id="rename-dialog" tabindex="-1" aria-labelledby="rename-dialog-title" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered">
      <div class="modal-content">
        <div class="modal-header">
          <h5 class="modal-title" id="rename-dialog-title">重命名文件</h5>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">&times;</span>
          </button>
        </div>
        <div class="modal-body">
          <div class="input-group mb-3">
            <input type="hidden" id="fullurl">
            <input type="hidden" id="oldname">
            <input type="text" class="form-control" id="newname">
            <div class="input-group-append">
              <span class="input-group-text" id="extname"></span>
            </div>
          </div>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
          <button type="button" class="btn btn-primary rename-submit">确定</button>
        </div>
      </div>
    </div>
  </div>
</body>

<script src="jquery-3.7.1.min.js"></script>
<script src="bootstrap.bundle.min.js"></script>
<script src="webui.js"></script>
</html>
